<#include "/admin/common/include/html_head.html"> <#include
"/admin/common/include/sysparam.html"> <#include
"/admin/common/include/pagination.html">

<div class="row-fluid">
	<div class="span12">
		<!-- BEGIN EXTRAS PORTLET-->
		<div class="portlet box">
			<div class="portlet-title">
				<div class="caption">
					<h5>模板页面设置</h5>
				</div>
			</div>
			<div class="portlet-body form">
				<form id="templateSearchForm"> 
					<div class="row-fluid">
						<div class="span6">
							<div class="dataTables_filter" id="sample_1_filter">
								<label>模板主题: <@select paramCode=templatePackageCode
									value=(_QUERY_n_eq_template_package_id)?if_exists item='
									name="_QUERY_n_eq_template_package_id"'/></label>
							</div>
						</div>
						<div class="span6">
							<div class="dataTables_filter" id="sample_1_filter">
								<label>模板名称: <input type="text" aria-controls="sample_1"
									value="${(_QUERY_s_eq_name)?if_exists}"
									class="span1 m-wrap medium" name="_QUERY_s_eq_name"
									id="_QUERY_s_eq_name"></label>
							</div>
						</div>
					</div>
				</form>

				<div class="alert alert-error " id="errTip" style="display: none;"></div>
				<div class="alert alert-success " id="sucTip" style="display: none;"></div>
				<div class="tab-pane active" id="tab_1">
					<div class="portlet-body">
						<div class="clearfix">
							<button id="template_query_btn" class="btn blue">
								<i class="icon-search"></i>&nbsp;&nbsp;查询
							</button>
							<button id="template_add_btn" class="btn blue">
								<i class="icon-plus"></i>&nbsp;&nbsp;新增
							</button>
							<button id="template_del_btn" class="btn blue">
								<i class="icon-trash"></i>&nbsp;&nbsp;删除
							</button>
						</div>
						<br>
						<form action="${contextPath}/template/show.op" id="QueryForm">
							<table class="table table-striped table-bordered table-hover"
								id="templateTable">
								<thead>
									<tr>
										<th style="width: 8px;"><input type="checkbox"
											class="group-checkable" data-set="#templateTable .checkboxes" /></th>
										<th>主题包</th>
										<th>模板名称</th>
										<th>模板类型</th>
										<th>模板路径</th>
										<th>是否有效</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<#list pageBean.result as tt >
									<tr class="odd gradeX">
										<td><input type="checkbox" class="checkboxes"
											value="${tt.id}" /></td>
										<td>${tt.templatePackageName}</td>
										<td>${tt.name}</td>
										<td>${tt.templateTypeCn}</td>
										<td>${tt.templatePath}</td> 
										<td><@translate paramCode=iseffCode
											value=(tt.iseff)?if_exists /></td>
										<td><a href='#' name="edit_action" value="${tt.id}">编辑</a></td>
									<tr></#list>
								</tbody>
							</table>
						</form>
						<@pagination searchFormId='templateSearchForm' pBean=pageBean />
					</div>
				</div>

			</div>
			<!-- END EXAMPLE TABLE PORTLET-->
		</div>
	</div>

</div>




<script>
	jQuery(document).ready(function() {
		tableAction.init({
			tableId : 'templateTable',
			queryUrl : '${contextPath}/template/show.op',
			deleteUrl : '${contextPath}/template/delete.op',
			editUrl : '${contextPath}/template/showEditForm.op',
			queryBtnId : 'template_query_btn',
			deleteBtnId : 'template_del_btn',
			searchFormId : 'templateSearchForm',
			isPopEditForm : false,
			editBtnId : 'template_add_btn'
		});

	});
</script>

<#include "/admin/common/include/html_bottom.html">
